home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 1.iso / desktop / mnyth2.zip / SETUP.FRM < prev    next >
Text File  |  1994-02-14  |  11KB  |  346 lines

  1. VERSION 2.00
  2. Begin Form SetupForm 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Many Things"
  5.    ClientHeight    =   5565
  6.    ClientLeft      =   2475
  7.    ClientTop       =   1650
  8.    ClientWidth     =   5505
  9.    Height          =   5970
  10.    Left            =   2415
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   5565
  15.    ScaleWidth      =   5505
  16.    Top             =   1305
  17.    Width           =   5625
  18.    Begin CheckBox LowMemoryCheck 
  19.       Caption         =   "Low Memory Mode"
  20.       Height          =   270
  21.       Left            =   1935
  22.       TabIndex        =   7
  23.       Top             =   4275
  24.       Width           =   2115
  25.    End
  26.    Begin CheckBox RandomFlagCheck 
  27.       Caption         =   "Random Sequence"
  28.       Height          =   240
  29.       Left            =   1935
  30.       TabIndex        =   8
  31.       Top             =   4680
  32.       Width           =   2130
  33.    End
  34.    Begin TextBox TxtStartSaver 
  35.       Height          =   315
  36.       Left            =   4815
  37.       TabIndex        =   5
  38.       Text            =   "0"
  39.       Top             =   3465
  40.       Width           =   615
  41.    End
  42.    Begin TextBox txtBmpSeconds 
  43.       Height          =   315
  44.       Left            =   4815
  45.       TabIndex        =   4
  46.       Text            =   "5"
  47.       Top             =   3105
  48.       Width           =   615
  49.    End
  50.    Begin TextBox txtBmpsDir 
  51.       Height          =   315
  52.       Left            =   3150
  53.       TabIndex        =   6
  54.       Text            =   "c:\windows"
  55.       Top             =   3825
  56.       Width           =   2280
  57.    End
  58.    Begin TextBox txtMaxCums 
  59.       Height          =   315
  60.       Left            =   4815
  61.       TabIndex        =   2
  62.       Text            =   "1000"
  63.       Top             =   2385
  64.       Width           =   615
  65.    End
  66.    Begin TextBox txtChangeMin 
  67.       Height          =   315
  68.       Left            =   4815
  69.       TabIndex        =   3
  70.       Text            =   "5"
  71.       Top             =   2745
  72.       Width           =   615
  73.    End
  74.    Begin TextBox txtRepeatCount 
  75.       Height          =   315
  76.       Left            =   4815
  77.       TabIndex        =   1
  78.       Text            =   "10"
  79.       Top             =   2025
  80.       Width           =   615
  81.    End
  82.    Begin TextBox txtMaxLines 
  83.       Height          =   315
  84.       Left            =   4815
  85.       TabIndex        =   0
  86.       Text            =   "100"
  87.       Top             =   1665
  88.       Width           =   615
  89.    End
  90.    Begin CommandButton cmdCancel 
  91.       Cancel          =   -1  'True
  92.       Caption         =   "Cancel"
  93.       Height          =   375
  94.       Left            =   2970
  95.       TabIndex        =   10
  96.       Top             =   5040
  97.       Width           =   1095
  98.    End
  99.    Begin CommandButton cmdOK 
  100.       Caption         =   "OK"
  101.       Default         =   -1  'True
  102.       Height          =   375
  103.       Left            =   1575
  104.       TabIndex        =   9
  105.       Top             =   5055
  106.       Width           =   1095
  107.    End
  108.    Begin Label Label11 
  109.       Caption         =   "Starting Saver (0=random):"
  110.       Height          =   225
  111.       Left            =   2430
  112.       TabIndex        =   20
  113.       Top             =   3510
  114.       Width           =   2325
  115.    End
  116.    Begin Label Label9 
  117.       Caption         =   "Seconds before changing pictures in slide show:"
  118.       Height          =   255
  119.       Left            =   690
  120.       TabIndex        =   19
  121.       Top             =   3150
  122.       Width           =   4170
  123.    End
  124.    Begin Label Label8 
  125.       Caption         =   "Location of bitmaps for slide show:"
  126.       Height          =   255
  127.       Left            =   135
  128.       TabIndex        =   18
  129.       Top             =   3870
  130.       Width           =   2985
  131.    End
  132.    Begin Label Label7 
  133.       Caption         =   "Maximum number of objects before clearing screen:"
  134.       Height          =   255
  135.       Left            =   300
  136.       TabIndex        =   17
  137.       Top             =   2430
  138.       Width           =   4485
  139.    End
  140.    Begin Label Label6 
  141.       Caption         =   "Minutes before changing to new saver:"
  142.       Height          =   255
  143.       Left            =   1395
  144.       TabIndex        =   16
  145.       Top             =   2775
  146.       Width           =   3375
  147.    End
  148.    Begin Label Label5 
  149.       Caption         =   "Number of new objects before changing colors:"
  150.       Height          =   255
  151.       Left            =   720
  152.       TabIndex        =   15
  153.       Top             =   2040
  154.       Width           =   4035
  155.    End
  156.    Begin Label Label4 
  157.       Caption         =   "Maximum number of objects before erasing old objects:"
  158.       Height          =   255
  159.       Left            =   90
  160.       TabIndex        =   14
  161.       Top             =   1710
  162.       Width           =   4740
  163.    End
  164.    Begin Image Image1 
  165.       Height          =   480
  166.       Left            =   180
  167.       Picture         =   SETUP.FRX:0000
  168.       Top             =   405
  169.       Width           =   480
  170.    End
  171.    Begin Label Label3 
  172.       Alignment       =   2  'Center
  173.       Caption         =   "Version 2.0"
  174.       FontBold        =   0   'False
  175.       FontItalic      =   0   'False
  176.       FontName        =   "Arial"
  177.       FontSize        =   8.25
  178.       FontStrikethru  =   0   'False
  179.       FontUnderline   =   0   'False
  180.       Height          =   240
  181.       Left            =   2085
  182.       TabIndex        =   13
  183.       Top             =   555
  184.       Width           =   1260
  185.    End
  186.    Begin Label Label2 
  187.       Caption         =   "Multiple Screen Savers by  Bruce McLean"
  188.       Height          =   255
  189.       Left            =   1050
  190.       TabIndex        =   12
  191.       Top             =   150
  192.       Width           =   3555
  193.    End
  194.    Begin Label Label1 
  195.       Alignment       =   2  'Center
  196.       Caption         =   "This is a collection of screen savers that switch at regular intervals to add a bit of variety to the screen."
  197.       FontBold        =   0   'False
  198.       FontItalic      =   0   'False
  199.       FontName        =   "Arial"
  200.       FontSize        =   8.25
  201.       FontStrikethru  =   0   'False
  202.       FontUnderline   =   0   'False
  203.       Height          =   495
  204.       Left            =   780
  205.       TabIndex        =   11
  206.       Top             =   1005
  207.       Width           =   3855
  208.    End
  209. End
  210. Option Explicit
  211.  
  212. Sub cmdCancel_Click ()
  213.     
  214.     End ' end program
  215.  
  216. End Sub
  217.  
  218. Sub cmdOK_Click ()
  219.     Dim i As Integer
  220.  
  221.     If RandomFlagCheck.Value = 1 Then
  222.         RandomFlag = 1
  223.     Else
  224.         RandomFlag = 0
  225.     End If
  226.  
  227.     If LowMemoryCheck.Value = 1 Then
  228.         LowMemoryFlag = 1
  229.     Else
  230.         LowMemoryFlag = 0
  231.     End If
  232.  
  233.     'remove trailing \ from directory
  234.     If Right$(txtBmpsDir, 1) = "\" Then
  235.       txtBmpsDir = Left$(txtBmpsDir, Len(txtBmpsDir) - 1)
  236.     End If
  237.  
  238.     ' store setup data in control.ini
  239.     i = WritePrivateProfileString(secName, keyName, txtMaxLines, iniName)
  240.     i = WritePrivateProfileString(secName, RepeatName, txtRepeatCount, iniName)
  241.     i = WritePrivateProfileString(secName, ChangeMinutesName, txtChangeMin, iniName)
  242.     i = WritePrivateProfileString(secName, MaxCumsName, txtMaxCums, iniName)
  243.     i = WritePrivateProfileString(secName, BmpsDirName, txtBmpsDir, iniName)
  244.     i = WritePrivateProfileString(secName, BmpSecondsName, txtBmpSeconds, iniName)
  245.     i = WritePrivateProfileString(secName, RandomFlagName, Str$(RandomFlag), iniName)
  246.     i = WritePrivateProfileString(secName, LowMemoryFlagName, Str$(LowMemoryFlag), iniName)
  247.     i = WritePrivateProfileString(secName, StartSaverName, txtStartSaver, iniName)
  248.  
  249.     On Error GoTo 1000
  250.     If Dir$(txtBmpsDir & "\*.bmps") = "" Then
  251.         MsgBox "Bitmaps not found in:" + Chr$(10) + txtBmpsDir + "\" + Chr$(10) + "Need to change location" + Chr$(10) + "of bitmaps to use", 48, "Many Things"
  252.     End If
  253.     On Error GoTo 0
  254.     
  255.     End ' end program
  256.  
  257. 1000 ' could not find path
  258.     On Error GoTo 0
  259.     Resume 1001
  260. 1001 MsgBox "Directory not found" + Chr$(10) + "for location of bitmaps:" + Chr$(10) + txtBmpsDir + "\", 48, "Many Things"
  261.     End
  262.  
  263. End Sub
  264.  
  265. Sub Form_Load ()
  266.     txtMaxLines = maxLines      ' Set to current max lines
  267.     txtRepeatCount = RepeatCount
  268.     txtChangeMin = MaxChangeMinutes
  269.     txtMaxCums = MaxCums
  270.     txtMaxLines.SelLength = 3   ' Select the current value
  271.     txtBmpsDir = BitmapsDir
  272.     txtBmpSeconds = BmpSeconds
  273.     If RandomFlag <> 0 Then
  274.       RandomFlagCheck.Value = 1
  275.     Else
  276.       RandomFlagCheck.Value = 0
  277.     End If
  278.  
  279.     If LowMemoryFlag <> 0 Then
  280.       LowMemoryCheck.Value = 1
  281.     Else
  282.       LowMemoryCheck.Value = 0
  283.     End If
  284.     
  285.     txtStartSaver = StartSaver
  286.  
  287. End Sub
  288.  
  289. Sub txtBmpSeconds_KeyPress (KeyAscii As Integer)
  290.     If KeyAscii < 32 Then
  291.         '                       ' Let Ctrl keys pass through
  292.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  293.         KeyAscii = 0            ' Discard chars other than digits
  294.     End If
  295.  
  296. End Sub
  297.  
  298. Sub txtChangeMin_KeyPress (KeyAscii As Integer)
  299.     If KeyAscii < 32 Then
  300.         '                       ' Let Ctrl keys pass through
  301.     ElseIf KeyAscii = Asc(".") Then ' only 1 decimal
  302.       If InStr(txtChangeMin, ".") > 0 Then
  303.         KeyAscii = 0            ' Discard extra decimals
  304.       End If
  305.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  306.         KeyAscii = 0            ' Discard chars other than digits
  307.     End If
  308.  
  309. End Sub
  310.  
  311. Sub txtMaxCums_KeyPress (KeyAscii As Integer)
  312.     If KeyAscii < 32 Then
  313.         '                       ' Let Ctrl keys pass through
  314.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  315.         KeyAscii = 0            ' Discard chars other than digits
  316.     End If
  317.  
  318. End Sub
  319.  
  320. Sub txtMaxLines_KeyPress (KeyAscii As Integer)
  321.     If KeyAscii < 32 Then
  322.         '                       ' Let Ctrl keys pass through
  323.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  324.         KeyAscii = 0            ' Discard chars other than digits
  325.     End If
  326. End Sub
  327.  
  328. Sub txtRepeatCount_KeyPress (KeyAscii As Integer)
  329.     If KeyAscii < 32 Then
  330.         '                       ' Let Ctrl keys pass through
  331.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  332.         KeyAscii = 0            ' Discard chars other than digits
  333.     End If
  334.  
  335. End Sub
  336.  
  337. Sub TxtStartSaver_KeyPress (KeyAscii As Integer)
  338.     If KeyAscii < 32 Then
  339.         '                       ' Let Ctrl keys pass through
  340.     ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
  341.         KeyAscii = 0            ' Discard chars other than digits
  342.     End If
  343.  
  344. End Sub
  345.  
  346.